/**
 ***********************************************************************************************************
 * 
 ***********************************************************************************************************
 * @file RBTextureSampler.h
 ***********************************************************************************************************/

#ifndef __RBTEXTURESAMPLER_H__
#define __RBTEXTURESAMPLER_H__

#ifdef  HEADER_ONCE
#pragma HEADER_ONCE
#endif

#ifdef  HEADER_MSG
#pragma HEADER_MSG(RBTextureSampler.h)
#endif

/***********************************************************************************************************
 * Includes
 ***********************************************************************************************************/
#include "RBRenderProcess/RBShaderResourceView.h"
#include "RBSamplerState.h"

/***********************************************************************************************************
 * Forward declarations
 ***********************************************************************************************************/

/***********************************************************************************************************
 * Classes
 ***********************************************************************************************************/

class RBTextureSampler
{
public:

                RBTextureSampler    (RBShaderResourceView* pTexture = 0, uint32 uiStage = 0, 
                                     RBSamplerState::AdressMode    u = RBSamplerState::SAM_WRAP,     
                                     RBSamplerState::AdressMode    v = RBSamplerState::SAM_WRAP,     
                                     RBSamplerState::AdressMode    w = RBSamplerState::SAM_WRAP,     
                                     RBSamplerState::FilterMode minF = RBSamplerState::SFM_POINT, 
                                     RBSamplerState::FilterMode magF = RBSamplerState::SFM_POINT, 
                                     RBSamplerState::FilterMode mipF = RBSamplerState::SFM_POINT,
                                     uint32 mipBias = 0, uint32 mipMax=0, uint32 aniso = 1);
    virtual    ~RBTextureSampler    ();

                RBTextureSampler    (const RBTextureSampler& src);

    RBTextureSampler& operator=     (const RBTextureSampler& rhs);

    uint32                      Stage;

    RBShaderResourceViewPtr     Texture;

    RBSamplerState::AdressMode  U;
    RBSamplerState::AdressMode  V;
    RBSamplerState::AdressMode  W;

    RBSamplerState::FilterMode  MinFilter;
    RBSamplerState::FilterMode  MagFilter;
    RBSamplerState::FilterMode  MipFilter;

    uint32                      MipMapLODBias;
    uint32                      MipMapMaxLevel;

    uint32                      AnisotropyMax;

    virtual void                Serialize   (RBStream& kStream);

};


/***********************************************************************************************************/

#endif // __RBTEXTURESAMPLER_H__